package com.itheima.boot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Map;

/**
 * @Description:
 * @Version: V1.0
 */
@Controller
public class FreemarkerController {

    @GetMapping("index")
    public String index(Map map) {  // Model ModelMap --> Map

        map.put("username", "方芳");

        // 物理视图 = 视图前缀 + 视图名称 + 视图后缀
        // 物理视图 = classpath:templates/  index  .ftl
        return "index"; // 逻辑视图
    }

}
